(function () {
    const srcData = {
        "responses": null,
        "form": {
            "description": "描述信息...",
            "onlineSafetyLevel": 0,
            "reputationTier": 1,
            "background": {
                "altText": null,
                "contentType": null,
                "fileIdentifier": null,
                "originalFileName": null,
                "resourceId": null,
                "resourceUrl": null,
                "height": null,
                "width": null,
                "size": null
            },
            "header": {
                "altText": null,
                "contentType": null,
                "fileIdentifier": null,
                "originalFileName": null,
                "resourceId": null,
                "resourceUrl": null,
                "height": null,
                "width": null,
                "size": null
            },
            "logo": {
                "altText": null,
                "contentType": null,
                "fileIdentifier": null,
                "originalFileName": null,
                "resourceId": null,
                "resourceUrl": null,
                "height": null,
                "width": null,
                "size": null
            },
            "tableId": "TCTQ9MK69E1QVAHZI6BV8Y4FQX",
            "otherInfo": null,
            "runtimeResponses": null,
            "permissions": [],
            "responderPermissions": [],
            "status": "Active",
            "category": null,
            "localeInfo": "{\"TimezoneOffset\":480,\"Locale\":\"zh-CN\",\"TimezoneId\":\"Asia/Shanghai\"}",
            "descriptiveQuestions": [],
            "questions": [
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:49:19.2167502Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "单选题",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "r500a20de36ea4e8590e95271a5032fb5",
                    "isQuiz": false,
                    "order": 1000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Choices\":[{\"Description\":\"单选项1\",\"FormsProDisplayRTText\":\"单选项1\"},{\"Description\":\"单选项2\",\"FormsProDisplayRTText\":\"单选项2\"},{\"Description\":\"单选项3\",\"FormsProDisplayRTText\":\"单选项3\"}],\"ChoiceType\":1,\"AllowOtherAnswer\":false,\"OptionDisplayStyle\":\"ListAll\",\"ChoiceRestrictionType\":\"None\"}",
                    "required": true,
                    "title": "单选题",
                    "type": "Question.Choice",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "7e807cf93ef546c0897e5bac4eb8e11c"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:51:38.9646332Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "多选题",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "rb323695205b54c539418ecb680ab06ef",
                    "isQuiz": false,
                    "order": 2000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Choices\":[{\"Description\":\"多选项1\",\"FormsProDisplayRTText\":\"多选项1\"},{\"Description\":\"多选项2\",\"FormsProDisplayRTText\":\"多选项2\"},{\"Description\":\"多选项3\",\"FormsProDisplayRTText\":\"多选项3\"},{\"Description\":\"多选项4\",\"FormsProDisplayRTText\":\"多选项4\"}],\"ChoiceType\":2,\"AllowOtherAnswer\":false,\"OptionDisplayStyle\":\"ListAll\",\"ChoiceRestrictionType\":\"None\",\"ShowRatingLabel\":false}",
                    "required": false,
                    "title": "多选题",
                    "type": "Question.Choice",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "72e69ce227a34c4b8f1e797c6dfc4d5b"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:52:17.8492801Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "下拉题",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "rd6fe1342f80a4f1884335d4e5e835a68",
                    "isQuiz": false,
                    "order": 3000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Choices\":[{\"Description\":\"下拉选项1\",\"FormsProDisplayRTText\":\"下拉选项1\"},{\"Description\":\"下拉选项2\",\"FormsProDisplayRTText\":\"下拉选项2\"}],\"ChoiceType\":1,\"AllowOtherAnswer\":false,\"OptionDisplayStyle\":\"Dropdown\",\"ChoiceRestrictionType\":\"None\",\"ShowRatingLabel\":false}",
                    "required": false,
                    "title": "下拉题",
                    "type": "Question.Choice",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "ab13b52c25a94b14a35aa8b1329adfe7"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:54:08.6204993Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "量表题（NPS）",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "ra8a38f2b2e414d1cb586640d564aef1a",
                    "isQuiz": false,
                    "order": 8000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"LeftDescription\":\"完全不可能\",\"RightDescription\":\"极有可能\",\"ShowRatingLabel\":false,\"IsMathQuiz\":false}",
                    "required": false,
                    "title": "量表题（NPS）",
                    "type": "Question.NPS",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "142f84aef21f44e0aed0a03558d508be"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:55:42.4431214Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "请输入你的出生日期",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "r07aef0ab2506480fbe922d1f46c085c4",
                    "isQuiz": false,
                    "order": 6000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Date\":true,\"Time\":false,\"ShuffleOptions\":false,\"ShowRatingLabel\":false,\"IsMathQuiz\":false}",
                    "required": false,
                    "title": "请输入你的出生日期",
                    "type": "Question.DateTime",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "8aac1cf7d6cc44b2a0d651398171be75"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:56:29.904371Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "单项填空",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "rccb895d0ebea4703b62103015d65ba4c",
                    "isQuiz": false,
                    "order": 7000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Multiline\":false,\"ShuffleOptions\":false,\"ShowRatingLabel\":false,\"IsMathQuiz\":false,\"NumberValidationRule\":\"None\"}",
                    "required": false,
                    "title": "单项填空",
                    "type": "Question.TextField",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "afd66e74a4bc4658a45256b2de80160d"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:57:07.1857929Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": null,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "量表题（评分题）",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "rb5c4370bb1cb450db38e18e06d9e9e64",
                    "isQuiz": false,
                    "order": 4750500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"Length\":5,\"RatingShape\":\"Number\",\"LeftDescription\":\"\",\"RightDescription\":\"\",\"MinRating\":1,\"ShuffleOptions\":false,\"ShowRatingLabel\":false,\"IsMathQuiz\":false}",
                    "required": false,
                    "title": "量表题（评分题）",
                    "type": "Question.Rating",
                    "justification": null,
                    "allowCustomChoice": null,
                    "trackingId": "da5dcf3fbba441f68722798d3e11ba4d"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T02:59:19.2039621Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": true,
                    "choices": [
                        {
                            "id": 1,
                            "order": 2,
                            "displayText": "选项9",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"选项9\"}",
                            "key": "fda9feb2-4986-4b87-b34d-80de60111a6a",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 2,
                            "order": 3,
                            "displayText": "选项10",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"选项10\"}",
                            "key": "0acbe01b-8c86-48cb-9b84-2414b7934f9a",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 3,
                            "order": 1,
                            "displayText": "选项8",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"选项8\"}",
                            "key": "81c11f26-124d-498b-8e36-0a38e2f09c91",
                            "formsProDisplayRTText": null
                        }
                    ],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "排序题",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "r11948ad6ad41481b82009fb73fbf6f19",
                    "isQuiz": false,
                    "order": 4500500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"ShuffleOptions\":false,\"ShowRatingLabel\":false,\"IsMathQuiz\":false}",
                    "required": false,
                    "title": "排序题",
                    "type": "Question.Ranking",
                    "justification": null,
                    "allowCustomChoice": false,
                    "trackingId": "359f4195f1b2431885036a66753aad3b"
                },
                {
                    "groupId": null,
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T03:03:42.696051Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": false,
                    "choices": [
                        {
                            "id": 1,
                            "order": 3,
                            "displayText": "列选项3",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"<span>列选项</span>3\"}",
                            "key": "875b10d2-b769-4f7a-aad5-69c31a13e76b",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 2,
                            "order": 5,
                            "displayText": "列选项5",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"<span>列选项</span>5\"}",
                            "key": "22caedb4-d18a-45cf-ab71-668d0307a0a3",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 3,
                            "order": 4,
                            "displayText": "列选项4",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"<span>列选项</span>4\"}",
                            "key": "82d9c551-ce29-4430-8200-995a8186c0cc",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 4,
                            "order": 1,
                            "displayText": "列选项1",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"列选项1\"}",
                            "key": "b79c32d0-e3b7-49b6-8269-37d09f969f6f",
                            "formsProDisplayRTText": null
                        },
                        {
                            "id": 5,
                            "order": 2,
                            "displayText": "列选项2",
                            "description": null,
                            "isCustomChoice": false,
                            "customProperties": "{\"FormsProDisplayRTText\":\"<span>列选项</span>2\"}",
                            "key": "8c7a2a8e-50df-417c-b33f-f2452fd15ddc",
                            "formsProDisplayRTText": null
                        }
                    ],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "矩阵单选",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "ra12df38d4ed8431bb53a6bd08f99ac74",
                    "isQuiz": false,
                    "order": 9000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": "{\"ShuffleOptions\":false,\"ShowRatingLabel\":false,\"IsMathQuiz\":false}",
                    "required": false,
                    "title": "矩阵单选",
                    "type": "Question.MatrixChoiceGroup",
                    "justification": null,
                    "allowCustomChoice": false,
                    "trackingId": "abe320fcffce40e7af7b4e635fec400b"
                },
                {
                    "groupId": "ra12df38d4ed8431bb53a6bd08f99ac74",
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T03:03:43.3434528Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": false,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "行标题2",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "rafb056a68e7a4a3d981b1ac91e92fe67",
                    "isQuiz": false,
                    "order": 11000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": null,
                    "required": false,
                    "title": "行标题2",
                    "type": "Question.MatrixChoice",
                    "justification": null,
                    "allowCustomChoice": false,
                    "trackingId": "cbbbf60ecef14ca48fe6dd613d55220b"
                },
                {
                    "groupId": "ra12df38d4ed8431bb53a6bd08f99ac74",
                    "defaultValue": null,
                    "image": {
                        "altText": null,
                        "contentType": null,
                        "fileIdentifier": null,
                        "originalFileName": null,
                        "resourceId": null,
                        "resourceUrl": null,
                        "height": null,
                        "width": null,
                        "size": null
                    },
                    "modifiedDate": "2023-11-30T03:03:43.3695572Z",
                    "status": "Added",
                    "subtitle": null,
                    "allowMultipleValues": false,
                    "choices": [],
                    "titleHasPhishingKeywords": false,
                    "subtitleHasPhishingKeywords": false,
                    "fileUploadSPOInfo": null,
                    "formsProRTQuestionTitle": "行标题1",
                    "formsProRTSubtitle": null,
                    "questionTagForIntelligence": null,
                    "insightsInfo": null,
                    "isFromSuggestion": false,
                    "id": "r0fb832c198cd415a8e4c50bac6f7ab83",
                    "isQuiz": false,
                    "order": 10000500,
                    "deserializedQuestionInfo": null,
                    "questionInfo": null,
                    "required": false,
                    "title": "行标题1",
                    "type": "Question.MatrixChoice",
                    "justification": null,
                    "allowCustomChoice": false,
                    "trackingId": "90cfe35c115047ec9eb16dc5083c70a9"
                }
            ],
            "predefinedResponses": null,
            "fillOutRemainingTime": 0,
            "timedFormStartTime": "0001-01-01T00:00:00Z",
            "distributionInfo": "{\"GeneratedImage\":{\"altText\":\"\",\"contentType\":\"image/png\",\"fileIdentifier\":\"2db6df53-8557-4917-81ab-39a923c35633\",\"originalFileName\":\"c16048af-5da6-4b3e-9377-e6f01d0e91b3\",\"resourceId\":\"b53cba45-6ecd-4914-b88a-a63b53811909\",\"resourceUrl\":\"https://lists.office.com/Images/9188040d-6c67-4c5b-b112-36a304b66dad/00000000-0000-0000-0003-00005639b07a/TCTQ9MK69E1QVAHZI6BV8Y4FQX/b53cba45-6ecd-4914-b88a-a63b53811909\",\"height\":450,\"width\":800,\"size\":157319}}",
            "id": "DQSIkWdsW0yxEjajBLZtrQAAAAAAAAAAAAMAAFY5sHpUQ1RROU1LNjlFMVFWQUhaSTZCVjhZNEZRWC4u",
            "title": "t004_对标wenjuanxing",
            "createdDate": "2023-11-30T02:49:11.5851085Z",
            "modifiedDate": "2023-11-30T03:10:04.5384209Z",
            "version": "1.0",
            "ownerId": "00000000-0000-0000-0003-00005639b07a",
            "ownerTenantId": "9188040d-6c67-4c5b-b112-36a304b66dad",
            "settings": "{\"RequiresUniqueResponse\":false,\"IsAnonymous\":true,\"NotRecordIdentity\":false,\"IsQuizMode\":false,\"PermissionForResponder\":1}",
            "deserializedSettings": null,
            "softDeleted": 0,
            "thankYouMessage": null,
            "flags": 4,
            "emailReceiptEnabled": null,
            "type": "form",
            "meetingId": null,
            "formsInsightsInfo": null,
            "formsProRTTitle": "t004_对标wenjuanxing",
            "formsProRTDescription": "描述信息...",
            "defaultLanguage": null,
            "dataClassificationLevel": null,
            "localeList": [],
            "responseThresholdCount": null,
            "inviteExpiryDays": null,
            "tenantSwitches": 1,
            "privacyUrl": "https://go.microsoft.com/fwlink/?LinkId=521839",
            "collectionId": null,
            "fillOutTimeLimit": 0,
            "mfpBranchingData": null,
            "rowCount": 0,
            "progressBarEnabled": "false",
            "trackingId": "f98be1963eac40e3bbeeeac01ff0e432"
        }
    }

    //获取json长度
    const getJsonLength = function (jsonData) {
        //return Object.keys(jsonData).length;
        var jsonLength = 0;
        for (var item in jsonData) {
            jsonLength++;
        }
        return jsonLength;
    }

    //获取类型
    const getType = function (data) {
        if ("Question.Choice" == data.type) {
            // let qstInfo = JSON.parse(jsonstr);
            let qstInfo = eval('(' + data.questionInfo + ')');
            if ("ListAll" == qstInfo.OptionDisplayStyle) {
                if (1 == qstInfo.ChoiceType) {
                    return "单选";
                } else if (2 == qstInfo.ChoiceType) {
                    return "多选";
                } else {
                    return "未知选择题";
                }
            } else if ("Dropdown" == qstInfo.OptionDisplayStyle) {
                return "下拉选项";
            }

        } else if ("Question.TextField" == data.type) {//输入框
            // let qstInfo = JSON.parse(jsonstr);
            let qstInfo = eval('(' + data.questionInfo + ')');
            if (true == qstInfo.Multiline) {
                return "文本框";
            } else {
                return "填空";
            }
        } else if ("Question.Rating" == data.type) {
            return "量表";//包含数字，星星，大拇指赞，笑脸，爱心
        } else if ("Question.DateTime" == data.type) {
            return "文本框";//日期
        } else if ("Question.MatrixChoiceGroup" == data.type) {
            return "矩阵单选";
        } else if ("Question.NPS" == data.type) {
            return "量表"; //1-10的值
        } else if ("Question.Ranking" == data.type) {
            return "排序选择"; //1-10的值
        } else if ("Question.ColumnGroup" == data.type) {// 分区节点
            return "占位题";
        } else {
            return "未知";
        }
    }

    //通用匹配提取
    const getMatchedStrs = function (str, reg) {
        return str.match(reg)[1];
    }

    //获取选项
    const getOptions = function (data) {
        let inner = new Array();

        //评分（量表？）
        if ("Question.Rating" == data.type) { //
            // let qstInfo = JSON.parse(jsonstr);
            let qstInfo = eval('(' + data.questionInfo + ')');
            for (let i = qstInfo.MinRating; i <= qstInfo.Length; i++) {
                let tmpObj = new Object();
                tmpObj.title = i.toString();
                tmpObj.optionId = i.toString();
                tmpObj.value = -1;
                inner.push(tmpObj);
            }
            return inner;
        }

        //nps量表
        if ("Question.NPS" == data.type) {
            let qstInfo = eval('(' + data.questionInfo + ')');
            for (let i = 0; i <= 10; i++) { //在msforms中目前这里是固定的0-10的整数
                let tmpObj = new Object();
                tmpObj.title = "";
                if (0 == i) {
                    tmpObj.title = qstInfo.LeftDescription;
                } else if (10 == i) {
                    tmpObj.title = qstInfo.RightDescription;
                }
                tmpObj.optionId = i.toString();
                tmpObj.value = -1;
                inner.push(tmpObj);
            }
            return inner;
        }

        switch (data.type) {
            case "Question.Choice"://单选,多选,下拉选
                // let qstInfo = JSON.parse(jsonstr);
                let qstInfo = eval('(' + data.questionInfo + ')');
                let optionsLength = getJsonLength(qstInfo.Choices);
                for (let i = 0; i < optionsLength; i++) {
                    let tmpObj = new Object();
                    tmpObj.title = qstInfo.Choices[i].Description;
                    tmpObj.optionId = tmpObj.title;//没有选项id,由于提交用的“选项字符串” 故这里也用
                    tmpObj.value = -1;
                    inner.push(tmpObj);
                }
                if (qstInfo.hasOwnProperty("AllowOtherAnswer")) {
                    if (true == qstInfo.AllowOtherAnswer) {
                        let tmpObj = new Object();
                        tmpObj.title = "其他|underline";
                        tmpObj.optionId = "";//没有选项id,由于提交用的“选项字符串” 故这里用答题者输入的字符串
                        tmpObj.value = -1;
                        inner.push(tmpObj);
                    }
                }
                break;
            case "Question.Ranking"://排序
                let ranksLength = getJsonLength(data.choices);
                for (let i = 0; i < ranksLength; i++) {
                    let tmpObj = new Object();
                    tmpObj.title = data.choices[i].displayText;
                    tmpObj.optionId = data.choices[i].id.toString();
                    tmpObj.value = -1;
                    inner.push(tmpObj);
                }
                break;
            default:
                break;
        }
        return inner;
    }

    //更新矩阵量表
    const upgradeMatrix = function (dataArray, mchDict, mcvDict) {
        for (let i = 0; i < dataArray.length; i++) {
            if ("矩阵单选" != dataArray[i].type) {
                continue;
            }
            let inner = new Array();
            let groupId = dataArray[i].qid;
            let horiGroup = mchDict[groupId];//[{"title": title, "id": id}]
            let vertSrcData = mcvDict[groupId];//原始数据
            for (let j = 0; j < horiGroup.length; j++) {
                vertLength = getJsonLength(vertSrcData.choices);
                for (let k = 0; k < vertLength; k++) {
                    let tmpObj = new Object();
                    const val = k + 1;
                    tmpObj.title = horiGroup[j].title + "_" + vertSrcData.choices[k].id + "_" + vertSrcData.choices[k].displayText;//格式：行名_列id_列名
                    tmpObj.optionId = horiGroup[j].id + "_" + vertSrcData.choices[k].key + "_" + vertSrcData.choices[k].id;//格式：questionId_列key_列id
                    tmpObj.value = val;
                    inner.push(tmpObj);
                }
            }
            dataArray[i].inner = inner;
        }
    }

    //获取跳题数据
    const getJumpData = function (questionInfo) {
        let qstInfo = eval('(' + questionInfo + ')');
        let choiLength = getJsonLength(qstInfo.Choices);
        let jumpData = new Array()
        for (let j = 0; j < choiLength; j++) {
            let branchInfo = qstInfo.Choices[j].BranchInfo;
            if (undefined == branchInfo) {
                continue;
            }
            let jmpObj = new Object();
            jmpObj.destId = branchInfo.TargetQuestionId; // 跳转的id。跳到结束赋值'-1'或'0'
            jmpObj.optionId = qstInfo.Choices[j].Description; // 选中选项id，选中才跳转。但由于没有选项id，故而用Description（即选项名）替代
            jmpObj.condition = 1;//跳转条件：1选定；2未选定
            jumpData.push(jmpObj);
        }
        return jumpData;
    }

    //针对多选数量有限制的（比如最多选几个）添加到range
    const getRangeIfExist = function (data) {
        let range = null;
        let qstInfo = eval('(' + data.questionInfo + ')');
        if (qstInfo.hasOwnProperty("ChoiceRestrictionType")) {
            let num = parseInt(qstInfo.ChoiceMaxBoundary);
            if ("AtMost" == qstInfo.ChoiceRestrictionType) {//最多
                range = {
                    minvalue: 1,
                    maxvalue: num
                };
            } else if ("Exactly" == qstInfo.ChoiceRestrictionType) {//刚好
                //ChoiceMinBoundary == ChoiceMaxBoundary
                range = {
                    minvalue: num,
                    maxvalue: num
                };
            } else {//if("None" == qstInfo.ChoiceRestrictionType) {
                //无限制
            }
        }
        return range;
    }

    // 获取系统类型
    const traslateType = function (type, srcType) {
        if ("单选" == type) {
            return "SINGLE";
        } else if ("多选" == type) {
            return "MULTIPLE";
        } else if ("下拉选项" == type) {
            return "SINGLE_SELECT";
        } else if ("排序选择" == type) {
            return "SORTED";
        } else if ("量表" == type) {
            return "SCALE";
        } else if ("矩阵单选" == type | "矩阵量表" == type) {
            return "MATRIX";
        } else if ("矩阵多选" == type) {
            return "MULTIPLE_MATRIX";
        } else if ("滑动条" == type) {
            return "SINGLE_SLIDE";
        } else if ("矩阵滑动" == type) {
            return "SLIDE";
        } else if ("比重" == type) {
            return "RATE";
        } else if ("填空" == type || "文本框" == type) {
            if (srcType.startsWith("Question.DateTime")) {//日期题
                return "DATE";
            } else {
                return "TEXT";
            }
        } else if ("矩阵填空" == type) {
            return "MATRIX_TEXT";
        } else if ("占位题" == type) {
            return "DESCRIPTION";
        } else {
            return type;
        }
    }

    // 转换为jump字典
    const translate2JumpDict = function (oldJumpData) {
        let jumpDict = {};
        let len  = getJsonLength(oldJumpData);
        for(let i=0; i<len; i++) {
            jumpDict[oldJumpData[i].optionId] = oldJumpData[i].destId;
        }
        return jumpDict;
    }

    // 转译是否必须：0代表非必填；1代表必填
    const traslateRequired = function (isReq) {
        if (isReq) { //必填
            return 1;
        }
        return 0;
    }

    // 判断是否为填空类题型
    const isText = function (curQst) {
        if ("TEXT" == curQst.sys_type || "DATE" == curQst.sys_type || "MULTIPLE_TEXT" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {
            return true;
        }
        return false;
    }

    // 设置最大最小值，如果存在的话
    const setMaxAndMinIfExist = function (curQst, range) {
        if("SCALE" == curQst.sys_type) { //量表不设置max和min
            return;
        }
        if (undefined == range || null == range) {
            return;
        }
        curQst.min_oper_num = range.minvalue;
        curQst.max_oper_num = range.maxvalue;
    }

    // 设置选项维度跳题逻辑，如果存在的话
    const setJumpOnOptIfExist = function(curQst, option, jumpDict) {
        let optVal = jumpDict[option.value];
        if(curQst.is_jump && undefined != optVal) {
            option.is_jump = true; // 是否跳题
            option.jump_to = optVal; // 跳到第几题
        }
    }

    // 转译选项
    const tanslateOptions = function (optionList, curQst, srcQstData, dataIndexDict, jumpDict) {
        let optArr = new Array();
        let len = getJsonLength(optionList);
        //{"lastDataIndex" : 0, "curQstDataIndex":[]};
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        for (let i = 0; i < len; i++) {
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title = curQst.title; // 和题目外部一样
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = optionList[i].title; // 题目的选项名称
            option.value = i+1;
            option.real_value = optionList[i].optionId; // 问卷提交对应的值

            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            setJumpOnOptIfExist(curQst, option, jumpDict); //设置选项维度跳题逻辑，如果存在的话

            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = curQst.is_text; // 是否需要填空 - 默认false
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = curQst.min_oper_num; // 最小值
            option.max_oper_num = curQst.max_oper_num; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵or多填
            if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {//多选每个选项都要有索引
                option.data_index = lastDataIndex + i; // 数据库索引
                dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
            } else {
                option.data_index = lastDataIndex; // 数据库索引
            }
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
        }
        if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {
            dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        } else if("DESCRIPTION" == curQst.sys_type) {
            //描述类占位题不生成dataIndexDict值
        } else {
            dataIndexDict["curQstDataIndex"].push(lastDataIndex);
            dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        }
        return optArr;
    }

    // 构建填空option
    const buildTextOption = function (curQst, dataIndexDict) {
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title; // 和题目外部一样
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = ""; // 题目的选项名称
        option.value = 1;
        option.real_value = ""; // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵or多填
        option.data_index = lastDataIndex; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        dataIndexDict["curQstDataIndex"].push(lastDataIndex);
        dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        return option;
    }

    // 获取子节点选项（只针对矩阵or多填）
    const getChildOption = function (maxNum, curQst, oldData) {
        let optArr = new Array();
        if (undefined == maxNum || null == maxNum) {
            return optArr;
        }
        for (let i = 0; i < maxNum; i++) {//矩阵单选，矩阵量表，矩阵多选，矩阵填空
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title = curQst.title + oldData.srcQstData.mcvDict[curQst.title_id].choices[i].displayText; // 父题目+本title
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = oldData.srcQstData.mcvDict[curQst.title_id].choices[i].displayText; // 题目的选项名称
            option.value = i+1;
            option.real_value = oldData.srcQstData.mcvDict[curQst.title_id].choices[i].id; // 问卷提交对应的值
            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = curQst.is_text; // 是否需要填空 - 默认false
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = 0; // 最小值
            option.max_oper_num = 0; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵题or多填
            option.data_index = curQst.data_index; // 数据库索引
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
        }
        return optArr;
    }

    // 获取子选项（只针对矩阵or多填）
    const getChildren = function (oldData, curQst, dataIndexDict) {
        let optionList = oldData.inner;
        let range = oldData.range;
        let childArr = new Array();

        //{"lastDataIndex" : 0, "curQstDataIndex":[]};
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let len = 0;
        if ("MATRIX" == curQst.sys_type) {//矩阵单选，矩阵量表
            len = getJsonLength(oldData.srcQstData.mchDict[curQst.title_id]);
            for (let i = 0; i < len; i++) {
                let curChild = new Object();
                curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
                curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
                curChild.title = curQst.title + oldData.srcQstData.mchDict[curQst.title_id][i].title; //  parent的title + child的name组成一个title
                curChild.title_type = curQst.title_type; // 和题目外部一样
                curChild.sys_type = curQst.sys_type; // 和题目外部一样
                curChild.name = oldData.srcQstData.mchDict[curQst.title_id][i].title; // 题目的选项名称
                curChild.value = i+1;
                curChild.real_value = oldData.srcQstData.mchDict[curQst.title_id][i].id; // 问卷提交对应的值
                curChild.is_jump = false; // 是否跳题
                curChild.jump_to = ""; // 跳到第几题
                curChild.req = curQst.req; // 是否必须 - 和题目外部一样
                curChild.is_text = false; // 是否需要填空 - 默认false
                curChild.relation = ""; // 关联 - 内部不需要这个字段
                curChild.min_oper_num = 0; // 最小值
                curChild.max_oper_num = 0; // 最大值
                setMaxAndMinIfExist(curChild, range);
                curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
                curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
                curChild.is_reverse = false; // 是否反向 - 默认false
                curChild.data_index = dataIndexDict["lastDataIndex"] + i; // 数据库索引
                dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"] + i);
                curChild.options = getChildOption(getJsonLength(oldData.srcQstData.mcvDict[curQst.title_id].choices), curChild, oldData); // 选项
                curChild.children = []; // 针对矩阵or多填题
                curChild.is_repeat = false; // 是否去重 - 解析默认false
                childArr.push(curChild);
            }
        } else {
            len = getJsonLength(optionList);
            for (let i = 0; i < len; i++) {
                let curChild = new Object();
                curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
                curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
                curChild.title = curQst.title + optionList[i].title == undefined? "": optionList[i].title; //  parent的title + child的name组成一个title
                curChild.title_type = curQst.title_type; // 和题目外部一样
                curChild.sys_type = curQst.sys_type; // 和题目外部一样
                curChild.name = optionList[i].title.split("_")[0]; // 题目的选项名称
                curChild.value = i+1;
                curChild.real_value = optionList[i].optionId; // 问卷提交对应的值
                curChild.is_jump = false; // 是否跳题
                curChild.jump_to = ""; // 跳到第几题
                curChild.req = curQst.req; // 是否必须 - 和题目外部一样
                curChild.is_text = curQst.is_text; // 是否需要填空 - 默认false
                curChild.relation = ""; // 关联 - 内部不需要这个字段
                curChild.min_oper_num = 0; // 最小值
                curChild.max_oper_num = 0; // 最大值
                setMaxAndMinIfExist(curChild, range);
                curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
                curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
                curChild.is_reverse = false; // 是否反向 - 默认false
                curChild.data_index = lastDataIndex + i; // 数据库索引
                curChild.options = getChildOption((range == undefined || range == null) ? null : range.maxvalue, curChild, oldData); // 选项
                curChild.children = []; // 针对矩阵or多填题
                curChild.is_repeat = false; // 是否去重 - 解析默认false
                childArr.push(curChild);
                dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
            }
            dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        }
        return childArr;
    }

    // 获取data_index数据中的多选选项
    const getDataIdxCheckboxOption = function (curQst, dataIndexDict, idx) {
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title; // 和题目外部一样
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = curQst.name; // 题目的选项名称
        option.value = idx+1;
        option.real_value = curQst.value; // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵or多填
        option.data_index = lastDataIndex; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        dataIndexDict["curQstDataIndex"].push(lastDataIndex);
        dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        return option;
    }

    // 获取data_index数据
    const getDataIndexArr = function (result) {
        let dataIndexArr = new Array(); // 数据库对应的数据

        let counter = 0;
        let dataArr = result.data; // new Array();//
        let len = getJsonLength(dataArr);
        let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
        for (let i = 0; i < len; i++) {
            //console.log(key);
            // if ("多选" == dataArr[i].type) {
            //     let optionList = dataArr[i].inner;
            //     let len = getJsonLength(optionList);
            //     for (let j = 0; j < len; j++) {
            //         let curData = dataArr[i];
            //         let tmp = new Object();
            //         tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            //         tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            //         tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            //         tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            //         tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            //         tmp.name = tmp.title; // 题目名称，同title
            //         tmp.value = ""; // 值 - 题目维度下不需要填
            //         tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            //         tmp.jump_to = null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            //         tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            //         tmp.is_text = isText(tmp); // 是否填空题 bool
            //         tmp.relation = curData.relation;
            //         tmp.min_oper_num = 0; // 最小值
            //         tmp.max_oper_num = 0; // 最大值
            //         setMaxAndMinIfExist(tmp, curData.range);
            //         tmp.rate = 0; // 权重 - 题目维度下不需要填
            //         tmp.text = ""; // 填空内容 - 题目维度下不需要填
            //         tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            //         tmp.options = [getDataIdxCheckboxOption(tmp, dataIndexDict, j)];
            //         tmp.children = [];
            //         tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            //         dataIndexDict["curQstDataIndex"] = [];

            //         dataIndexArr.push(tmp);
            //     }
            // } else {
            let jumpDict = {};
            let curData = dataArr[i];
            let tmp = new Object();
            tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            tmp.name = tmp.title; // 题目名称，同title
            tmp.value = ""; // 值 - 题目维度下不需要填
            tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            if(curData.hasJump) {
                jumpDict = translate2JumpDict(curData.jumpData);
            }
            tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            tmp.is_text = isText(tmp); // 是否填空题 bool
            tmp.relation = curData.relation;
            tmp.min_oper_num = 0; // 最小值
            tmp.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(tmp, curData.range);
            tmp.rate = 0; // 权重 - 题目维度下不需要填
            tmp.text = ""; // 填空内容 - 题目维度下不需要填
            tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            tmp.options = [];
            tmp.children = [];
            if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
                || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
                tmp.children = getChildren(curData, tmp, dataIndexDict);
            } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
                tmp.options.push(buildTextOption(tmp, dataIndexDict));
            } else {
                tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
            }
            tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
            dataIndexDict["curQstDataIndex"] = [];

            dataIndexArr.push(tmp);
            // }
        }
        return dataIndexArr;
    }

    // 转换为新的结果
    const translate2newResult = function (result, resultNew) {
        let listDataArr = new Array(); // 返回的题目内容列表
        let dataArr = result.data; // new Array();//
        let len = getJsonLength(dataArr);
        let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
        for (let i = 0; i < len; i++) {
            let jumpDict = {};
            let curData = dataArr[i];
            let tmp = new Object();
            tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            tmp.name = curData.title; // 题目名称，给制单人看的
            tmp.value = ""; // 值 - 题目维度下不需要填
            tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            if(curData.hasJump) {
                jumpDict = translate2JumpDict(curData.jumpData);
            }
            tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            tmp.is_text = isText(tmp); // 是否填空题 bool
            tmp.relation = curData.relation;
            tmp.min_oper_num = 0; // 最小值
            tmp.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(tmp, curData.range);
            tmp.rate = 0; // 权重 - 题目维度下不需要填
            tmp.text = ""; // 填空内容 - 题目维度下不需要填
            tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            tmp.options = [];
            tmp.children = [];
            if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
                || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
                tmp.children = getChildren(curData, tmp, dataIndexDict);
            } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
                tmp.options.push(buildTextOption(tmp, dataIndexDict));
            } else {
                tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
            }
            if("DESCRIPTION" != tmp.sys_type) {//描述类占位题不生成dataIndexDict值
                tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            }
            tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
            dataIndexDict["curQstDataIndex"] = [];

            listDataArr.push(tmp);
        }
        resultNew.list = listDataArr;
        resultNew.data_index = getDataIndexArr(result);
        resultNew.total_data_index = dataIndexDict["lastDataIndex"];
    }

    // const srcData = window.qsSrcData;
    //加载题目主体函数定义
    const getDataArr = function () {
        let resultNew = { list: [], data_index: [], total_data_index: 0 };//list代表问卷的所有题目；data_index代表数据库对应的数据；

        var result = { title: '', error: '', data: [] };//error内容为加载失败消息：如问卷暂停、需微信登录等
        var formData = srcData.form == undefined ? srcData.data.form : srcData.form;
        var dataArray = new Array(); // 返回的题目内容列表
        var counter = 0;
        var questions = formData.questions;
        var descriptiveQuestions = formData.descriptiveQuestions;//分区节点

        //将descriptiveQuestions合并到questions
        questions = questions.concat(descriptiveQuestions);
        //按order排序
        questions.sort((a, b) => {
            return a.order - b.order
        });
        //移除第一个分区节点
        // questions.shift();

        let mchDict = [];//矩阵横向字典(行)
        let mcvDict = [];//矩阵纵向字典(列)
        let quesLen = getJsonLength(questions);
        let pageNo = 1;
        for (var i = 0; i < quesLen; i++) {
            if ("Question.MatrixChoice" == questions[i].type) {
                let title = questions[i].title;
                let id = questions[i].id;
                let grpId = questions[i].groupId;
                if (undefined == mchDict[grpId]) {// || null == mchDict[grpId]
                    mchDict[grpId] = new Array();
                }
                var tmpArr = mchDict[grpId];
                tmpArr.push({ "title": title, "id": id });
                mchDict[grpId] = tmpArr;
                continue;
            } else if ("Question.MatrixChoiceGroup" == questions[i].type) {
                mcvDict[questions[i].id] = questions[i];
            }

            var tmp = new Object();
            if ("Question.ColumnGroup" == questions[i].type) {
                pageNo++;
            }
            tmp.pageId = pageNo; // 页码ID
            tmp.id = ++counter; // 全局题号 ，从1开始递增。 

            tmp.qid = questions[i].id; // 题目id（提交使用的ID）
            tmp.type = getType(questions[i]);  // 见typeName 定义 返回字符串
            tmp.srcType = questions[i].type + "_" + questions[i].questionInfo; //题目原始类型
            tmp.range = null;
            tmp.relation = ''; //赋值关联项;见关联字符串定义(显示逻辑)
            tmp.hasJump = false;
            tmp.jumpData = null;

            if (null != questions[i].questionInfo && -1 != questions[i].questionInfo.indexOf("BranchInfo")) {
                tmp.hasJump = true;
                tmp.jumpData = getJumpData(questions[i].questionInfo);
            }
            tmp.inner = getOptions(questions[i]); // 选项数据。 见选项数据定义
            tmp.isRequired = questions[i].required; // 是否必选。
            tmp.title = questions[i].title; // 题目标题，需要避免使用特殊字符“_”
            if ("多选" == tmp.type) {
                tmp.range = getRangeIfExist(questions[i]);
            }
            if ("Question.ColumnGroup" == questions[i].type && null != questions[i].subtitle) {//分区节点，可能带副标题
                tmp.title += "-" + questions[i].subtitle;
            }

            if ("Question.MatrixChoiceGroup" == questions[i].type) {//矩阵单选结构特殊
                tmp.srcQstData = {"mchDict":mchDict, "mcvDict":mcvDict};
            } else {
                tmp.srcQstData = questions[i];
            }
            dataArray.push(tmp);
        }
        upgradeMatrix(dataArray, mchDict, mcvDict);//更新矩阵量表

        result.title = formData.title;
        result.data = dataArray;

        translate2newResult(result, resultNew);
        return resultNew; // return result; // 
    };

    console.log(JSON.stringify(getDataArr()));//测试输出结果

    return getDataArr();
})();